//
//  TwoViewController.m
//  AYWrapTextView
//
//  Created by AY on 16/6/24.
//  Copyright © 2016年 Jasperay. All rights reserved.
//

#import "TwoViewController.h"
#import "Masonry.h"

@interface TwoViewController ()

@end

@implementation TwoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor greenColor];
    

}

- (void)viewWillLayoutSubviews
{
    
    [self.toolBar mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view.mas_left);
        make.right.equalTo(self.view.mas_right);
        make.top.equalTo(self.view.mas_top).offset(100);    // 修改一下依赖，就向下伸缩了
        make.height.mas_equalTo(@44).priorityLow();
    }];
    [self.sendButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.toolBar.mas_right).offset(-5);
        make.bottom.equalTo(self.toolBar.mas_bottom).offset(-7);
        make.height.mas_equalTo(@30);
        make.width.mas_equalTo(@50);
    }];
        
    [self.adapTextView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.toolBar.mas_left).offset(5);
        make.right.equalTo(self.sendButton.mas_left).offset(-10);
        make.bottom.equalTo(self.toolBar.mas_bottom).offset(-5);
        make.top.equalTo(self.toolBar.mas_top).offset(5);
    }];
    

}

@end
